package com.stoneframe.base.util;

import java.io.InputStream;
import java.util.Properties;

public class ConfigHelper {
	
	private static final Logger logger=Logger.getLogger(ConfigHelper.class);
	
	public static String getPropertiesValue(String key){
		return getPropertiesValue("/configure.properties",key);
	}
	
	public static String getPropertiesValue(String path,String key){
		InputStream inputStream=ConfigHelper.class.getResourceAsStream(path);
		Properties properties=new Properties();
		try{
			properties.load(inputStream);
			inputStream.close();
		}catch(Exception e){
			logger.error(e.toString(), e);
		}
		return properties.getProperty(key);
	}

}
